package com.cxhc.system.service.app.impl;

import java.util.List;
import com.cxhc.common.utils.DateUtils;
import com.cxhc.system.domain.app.RpAttendRecord;
import com.cxhc.system.mapper.app.RpAttendRecordMapper;
import com.cxhc.system.service.app.IRpAttendRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 执勤记录Service业务层处理
 * 
 * @author Dhq
 * @date 2024-09-25
 */
@Service
public class RpAttendRecordServiceImpl implements IRpAttendRecordService
{
    @Autowired
    private RpAttendRecordMapper rpAttendRecordMapper;

    /**
     * 查询执勤记录
     * 
     * @param id 执勤记录主键
     * @return 执勤记录
     */
    @Override
    public RpAttendRecord selectRpAttendRecordById(Long id)
    {
        return rpAttendRecordMapper.selectRpAttendRecordById(id);
    }

    /**
     * 查询执勤记录列表
     * 
     * @param rpAttendRecord 执勤记录
     * @return 执勤记录
     */
    @Override
    public List<RpAttendRecord> selectRpAttendRecordList(RpAttendRecord rpAttendRecord)
    {
        return rpAttendRecordMapper.selectRpAttendRecordList(rpAttendRecord);
    }

    /**
     * 新增执勤记录
     * 
     * @param rpAttendRecord 执勤记录
     * @return 结果
     */
    @Override
    public int insertRpAttendRecord(RpAttendRecord rpAttendRecord)
    {
        return rpAttendRecordMapper.insertRpAttendRecord(rpAttendRecord);
    }

    /**
     * 修改执勤记录
     * 
     * @param rpAttendRecord 执勤记录
     * @return 结果
     */
    @Override
    public int updateRpAttendRecord(RpAttendRecord rpAttendRecord)
    {
        rpAttendRecord.setUpdateTime(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS));
        return rpAttendRecordMapper.updateRpAttendRecord(rpAttendRecord);
    }

    /**
     * 批量删除执勤记录
     * 
     * @param ids 需要删除的执勤记录主键
     * @return 结果
     */
    @Override
    public int deleteRpAttendRecordByIds(Long[] ids)
    {
        return rpAttendRecordMapper.deleteRpAttendRecordByIds(ids);
    }

    /**
     * 删除执勤记录信息
     * 
     * @param id 执勤记录主键
     * @return 结果
     */
    @Override
    public int deleteRpAttendRecordById(Long id)
    {
        return rpAttendRecordMapper.deleteRpAttendRecordById(id);
    }
}
